package hevs.eServices.client;

import hevs.eServices.client.object.Data;
import hevs.eServices.client.object.Item;
import hevs.eServices.client.object.Meter;
import hevs.eServices.client.object.Property;

import java.util.ArrayList;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("mysqlquery")
public interface MySQLQueryService extends RemoteService {
	
	ArrayList<Data> testQuery(String input) throws IllegalArgumentException;
	
	ArrayList<String> getDateLimit() throws IllegalArgumentException;
	
	int getDaySum(String start, String endDate) throws IllegalArgumentException;
	
	Item getItem(int idItem) throws IllegalArgumentException;
	
	Item getFullItem(int idItem) throws IllegalArgumentException;
	
	Meter getMeter(int idMeter) throws IllegalArgumentException;
	
	Meter getFullMeter(int idMeter) throws IllegalArgumentException;
	
	ArrayList<Item> getListItem() throws IllegalArgumentException;
	
	ArrayList<Item> getFullListItem() throws IllegalArgumentException;
	
	ArrayList<Meter> getListMeter(int idItem) throws IllegalArgumentException;

	ArrayList<Meter> getFullListMeter(int idItem) throws IllegalArgumentException;
	
	ArrayList<Property> getListProperty(int idMeter) throws IllegalArgumentException;
	
	ArrayList<Property> getFullListProperty(int idMeter) throws IllegalArgumentException;
	
	ArrayList<Data> getListDataByHour(int idMeter, String startDate, String endDate) throws IllegalArgumentException;
	
	ArrayList<Data> getListDataByDay(int idMeter, String startDate, String endDate) throws IllegalArgumentException;
	
	ArrayList<Data> getListDataByWeek(int idMeter, String startDate, String endDate) throws IllegalArgumentException;
	
	ArrayList<Data> getListDataByMonth(int idMeter, String startDate, String endDate) throws IllegalArgumentException;

	ArrayList<String> getDateLimit(int idMeter) throws IllegalArgumentException;
	
}
